package cn.interestingshop.dao.baseOrder;

import cn.interestingshop.dao.BaseDao;
import cn.interestingshop.model.entity.BaseOrder;

import java.sql.SQLException;

public class BaseOrderDaoImpl extends BaseDao<BaseOrder> implements BaseOrderDao {

    @Override
    public BaseOrder getBaseOrderByAccount(String account) {
        String sql = "SELECT id, user_id, account, user_address, create_time, amount, order_no FROM t_base_order WHERE account = ?;";
        BaseOrder baseOrder = new BaseOrder();

        try {
            return super.getResult(sql, baseOrder, new Object[]{account});
        } catch (SQLException throwables) {
            throwables.printStackTrace();

        }

        return null;
    }
}